package com.biz.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.biz.domain.Entiry;
import com.biz.service.ITestService;
import com.common.web.resp.vo.ResponseInfo;

/**
 * 测试多数据源切换
 *
 */
@Controller
@RequestMapping("/test")
public class TestController {

    @Autowired
    private ITestService testServiceImpl;

    @RequestMapping("/info")
    @ResponseBody
    public ResponseInfo getTest(){
        try{
            Entiry entiry = testServiceImpl.getInfo();
            return ResponseInfo.successInfo(entiry);
        }catch ( Exception e){
            e.printStackTrace();
        }

    return ResponseInfo.successInfo(null);
    }
}
